package com.mayuanfei.springioc;

import org.springframework.beans.factory.config.AbstractFactoryBean;

/**
 * Book的工厂类
 *
 * @author 老马
 * @date 2023-02-09 13:55
 */
public class BookFacotry extends AbstractFactoryBean<Book> {

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    protected Book createInstance() throws Exception {
        Book book = new Book();
        book.setBookName("01.spring简介");
        book.setAuthor(new User("user8", "老马8", "北京顺义8"));
        return book;
    }
}